import request from '@/utils/request'

export default {
   //创建订单
   createOrder(courseId,token){
    return request({
        url: `eduorder/order/createOrder/${courseId}?token=`+token,
        method: 'post'
    })
   },
   //得到订单信息
   getOrder(orderId){
     return request({
        url: `eduorder/order/getOrder/${orderId}`,
        method: 'get'
     })
   },
     //3、生成微信支付二维码
     createNative(cid) {
        return request({
          url: `/eduorder/pay-log/createNative/${cid}`,
          method: 'get'
        })
     },
    //4、根据id获取订单支付状态
     queryPayStatus(cid) {
        return request({
          url: `/eduorder/pay-log/queryPayStatus/${cid}`,
          method: 'get'
        })
     }
}